export function setItem(key, value) {
  localStorage.setItem(key, JSON.stringify(value));
}
export function getItem(key) {
  return JSON.parse(localStorage.getItem(key));
}
// 向key对应的数组追加数据
export function appendItem(key, value) {
  const item = getItem(key) || [];
  item.push(value);
  setItem(key, item);
}
